import { useEffect } from 'react';
import { Spin } from 'antd';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';

const css = {
  'width': '100%',
  'height': '100vh',
  'display': 'flex',
  'justifyContent': 'center',
  'alignContent': 'center',
  'alginItem': 'center'
}
function PageLoading() {
    
  useEffect(() => {

    const progress = NProgress.start();
    return () => {
      progress.done();
    }
  }, [])
  return (
    <div style={css}>
        <Spin></Spin>
    </div>
  )
 }

export default PageLoading